package com.jrx.anytxn.param.service.investor;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.param.dto.investor.PrInvestorInstallmentFeeReq;
import com.jrx.anytxn.param.dto.investor.PrInvestorInstallmentFeeRes;
import com.jrx.anytxn.param.entity.PrInvestorInstallmentFee;

/**
 * 分期手续费表 业务接口
 *
 * @author 黄秋平
 * @date 2020-5-20 15:14:07
 */
public interface IPrInvestorInstallmentFeeService {

    /**
     * 根据租户ID分页查询分期手续费参数信息
     * @param pageNum
     * @param pageSize
     * @param tenantId
     * @return
     * @throws TxnException
     */
    TxnPage<PrInvestorInstallmentFeeRes> findAllPageByTenId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;

    /**
     * 添加分期手续费参数
     * @param prInvestorInstallmentFeeReq
     * @return
     * @throws TxnException
     */
    PrInvestorInstallmentFeeRes addInstallmentFeeTable(PrInvestorInstallmentFeeReq prInvestorInstallmentFeeReq) throws TxnException;


    /**
     * 更新分期手续费参数
     *
     * @param prInvestorInstallmentFeeReq 分期手续费参数入参对象
     * @return PrInvestorInstallmentFeeRes 分期手续费参数响应参数
     * @throws TxnException
     */
    PrInvestorInstallmentFeeRes modifyInstallmentFeeTable(PrInvestorInstallmentFeeReq prInvestorInstallmentFeeReq) throws TxnException;

    /**
     * 通过租户ID和费用ID删除分期手续费参数
     * @param tenantId
     * @param investorInstallmentFeeId
     * @return
     * @throws TxnException
     */
    Boolean removeByTenIdAndFeeId(String tenantId, String investorInstallmentFeeId) throws TxnException;

    /**
     * 通过租户ID和分期手续费ID查询分期手续费参数
     * @param tenantId
     * @param investorInstallmentFeeId
     * @return
     * @throws TxnException
     */
    PrInvestorInstallmentFeeRes findByTenIdAndFeeId(String tenantId, String investorInstallmentFeeId) throws TxnException;


    /**
     * 根据手续费id、机构id和租户id查询信息
     * @param installmentFeeId
     * @param ordId
     * @param tenantId
     * @return
     * @throws TxnBizException
     */
    PrInvestorInstallmentFee findInvestorInstallmentByFeeId(String installmentFeeId, String ordId, String tenantId) throws TxnBizException;
}
